<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="favicon/bitbug_favicon (2).ico" type="image/x-icon">
    <title>旋转木马案例</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        body {
            perspective: 1000px;

        }

        img {
            width: 300px;
            height: 300px;
        }

        section {
            position: relative;
            width: 300px;
            height: 300px;
            margin: 150px auto;
            transform-style: preserve-3d;
        }

        section:hover {
            animation-play-state: paused;
        }

        section {
            animation: rotate 10s linear infinite;
        }

        @keyframes rotate {
            0% {
                transform: rotateY(0deg);
            }

            100% {
                transform: rotateY(360deg);
            }
        }

        section div {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        section div:nth-child(1) {
            transform: translateZ(300px);
        }

        section div:nth-child(2) {
            /* 先旋转后移动 */
            transform: rotateY(60deg) translateZ(300px);
        }

        section div:nth-child(3) {
            /* 先旋转后移动 */
            transform: rotateY(120deg) translateZ(300px);
        }

        section div:nth-child(4) {
            /* 先旋转后移动 */
            transform: rotateY(180deg) translateZ(300px);
        }

        section div:nth-child(5) {
            /* 先旋转后移动 */
            transform: rotateY(240deg) translateZ(300px);
        }

        section div:nth-child(6) {
            /* 先旋转后移动 */
            transform: rotateY(300deg) translateZ(300px);
        }
    </style>
</head>

<body>
    <section>
        <div><img
                src="https://tse3-mm.cn.bing.net/th/id/OIP-C.blcmLnwa1rJRgLJbbhtRqAHaHa?w=200&h=200&c=7&r=0&o=5&dpr=1.5&pid=1.7"
                alt=""></div>
        <div><img
                src="https://tse4-mm.cn.bing.net/th/id/OIP-C.hBygeTRub38je45SZi2a4QHaHa?w=163&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7"
                alt=""></div>
        <div><img
                src="https://tse3-mm.cn.bing.net/th/id/OIP-C.51EMuZtAu8Hm0CmBW4UHTAHaEo?w=250&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7"
                alt=""></div>
        <div><img
                src="https://tse4-mm.cn.bing.net/th/id/OIP-C.zUJpwz9GYQR52YM72HMKPwHaHa?w=159&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7"
                alt=""></div>
        <div><img
                src="https://tse3-mm.cn.bing.net/th/id/OIP-C.m-2xUfjI9LtcnUdxlEwYUAHaHa?w=163&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7"
                alt=""></div>
        <div><img
                src="https://tse1-mm.cn.bing.net/th/id/OIP-C.WbseNNCtD28ULYjstK2ZpgHaEo?w=255&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7"
                alt=""></div>
        <div><img
                src="https://tse4-mm.cn.bing.net/th/id/OIP-C.ftV34nc7DQ32JkU0UOaCDgHaGs?w=181&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7"
                alt=""></div>
    </section>
</body>

</html>